//
//  Tools.h
//  Phono
//
//  Created by Fee on 2025/7/4.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface Tools : NSObject

+ (NSString *)bundleId;
/// 设备id
+ (NSString *)deviceId;
/// 国家代码
+ (NSString *)countryCode;
/// appVersion
+ (NSString *)appVersion;
/// appName
+ (NSString *)appName;

/// window
+ (UIWindow *)window;

/// aes 加密
+ (NSString *)encryptAES:(NSString *)content key:(NSString *)key iv:(NSString *)iv;

/// aes 解密
+ (NSString *)decryptAES:(NSString *)base64EncodedString key:(NSString *)key iv:(NSString *)iv;

/// 判断一个对象是否是为空
+ (BOOL)isEmpty:(id)obj;

/// 字典转字符串
+ (NSString *)dictToString:(NSDictionary *)dict;

/// 字符串转json
+ (id)stringToJson:(NSString *)jsonString;

/// 随机从数组获取一个对象
+ (id)randomObjectFromArray:(NSArray *)array;

/// URLEncode
+ (NSString *)urlEncode:(NSString *)url;

@end

NS_ASSUME_NONNULL_END

